package com.tenbent.product.center.user.service;

import com.tenbent.product.base.security.CustomUserDetailsService;
//import com.tenbent.product.base.service.BaseService;
import com.tenbent.product.center.user.bo.User;
import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.security.core.userdetails.UserDetailsService;

/**
 * 用户数据服务层
 *
 * @author Randy
 *
 *         Created by ThinkPad on 2017/8/31.
 */
public interface UserService extends CustomUserDetailsService<User> {
	// BaseService<User>, UserDetailsService {

	/**
	 * security 安全验证，只有是admin角色的用户才能添加用户
	 *
	 */
	@PreAuthorize("hasRole('ADMIN')")
	User save(User user);

}
